package it.patterns.behavioral.mediator;

/**
 * DEfine an object that encapsulates how a set of objects interacts. Mediator
 * promotes loose coupling by keeping objects from referring to each other
 * explicitly, and it lets you vary their interaction independently
 * (proliferating interconnections tend to reduce reusability!).
 * 
 * You need to use Mediator when a set of objects communicate in well-defined
 * but complex ways. The resulting interaction are unstructured and difficult to
 * understand.<br/>
 * 
 * In the following diagram, colleagues sends and receive requests from a
 * Mediator object. The Mediator implements the cooperative behavior by routing
 * requests between the appropriate colleagues.
 * 
 * Benefits:
 * <ul>
 * <li>It limits subclassing</li>
 * <li>It decouple colleagues</li>
 * <li>It simplifies object protocols</li>
 * <li>It abstracts how objects cooperates</li>
 * <li>It centralizes control</li>
 * </ul>
 * 
 * <img src="Mediator.jpg" alt="Pattern Structure"/>
 * 
 * @author Luca D'Onofrio
 * 
 * @category Behavioral Pattern
 * @see "Design Patterns - Element of Reusable Object Oriented Software (Gamma,Helm, Johnson, Vlissides)"
 * 
 * @version 1.0
 * 
 */
public interface Mediator {

	public void colleagueChanged(Colleague colleague);

}
